package com.example.word2pdf;

import com.example.word2pdf.core.WordUtils;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Word2pdfApplication {

    public static void main(String[] args) {

        Map<String, String> map = new HashMap<String, String>();
        map.put("title", "九九互联");
        map.put("contractNo", "WH-99-sh-0005");
        map.put("name", "天津唐山科技有限公司");
        map.put("name2", "天津科技有限公司");
        map.put("date", new Date().toString());
        map.put("rate1", "30%");
        map.put("rate2", "34%");
        map.put("rate3", "35%");
        map.put("rate4", "50%");
        map.put("rate5", "30%");
        String srcPath = "applogs/pdf/test.docx";
        String destPath = "applogs/pdf/new-1.pdf";
        WordUtils.searchAndReplace(srcPath, destPath, map);
    }

}
